﻿
#ifndef __LocationViewController__
#define __LocationViewController__

#include "CrossApp.h"
#include "AppTool.h"

USING_NS_CC;

class LocationViewController : public CAViewController, public AmapLocationDelegate
{
    
public:

	LocationViewController();
    
	virtual ~LocationViewController();
    
protected:
    
    void viewDidLoad();
    
    void viewDidUnload();

	void onceLocBtClicked(CAControl* ctrl, DPoint point);

	void locBtClicked(CAControl* ctrl, DPoint point);

	virtual void onOnceLocationEnd(int code, double lat, double lng, const string& formatAddr, const string& province, const string& city, const string& district, const string& street, const string& number, const string& poi, const string& adcode);

	virtual void onLocationUpdate(int code, double lat, double lng, const string& formatAddr, const string& province, const string& city, const string& district, const string& street, const string& number, const string& poi, const string& adcode);

	void oncelocSchedule(float t);

	void locSchedule(float t);

private:

	CALabel* lb1;

	CALabel* lb2;

	int m_iLocNum;

	int m_iCode;

	double m_DLat;

	double m_DLng;
};


#endif
